<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<title>Insert title here</title>
<link rel="stylesheet"
	href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
  <script>

  $(function() {

    $( "input[type=submit], a, button" )

      .button()

      .click(function( event ) {
        	//move quickly
    	  //$('#1').before($('#2'));
        	
      });

  });

  </script>
</head>
<body>
<div id="parent">
   <div id="1">Some content1</div>
   <div id="2">Some content2</div>
</div>
<button>A button element</button>
</body>
</html>